package com.dq.json;

import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;

import net.sf.json.JSONArray;

public class TestJSONArray {

	
	
	public static void main(String[] args) {
		Map map=new HashMap();
		map.put("1","1111");
		map.put("2","2222");
		map.put("3","3333");
		map.put("4","4444");
		Map map1=new HashMap();
		map1.put("5", "5555");
		map1.put("6", "6666");
		map1.put("7", "7777");
		map.put("children", map1);
		List list=new ArrayList();
		list.add(map);
		JSONArray ja = JSONArray.fromObject(list);
		System.out.println(ja.toString());
	}
}
